﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="memberagree_parameter.aspx.cs" Inherits="YXShop.Web.admin.templates.label.memberagree_parameter" %>

<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>无标题页</title>
    <link href="../../style/admin.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript">
function ReturnValue()
{      
   //自定义内容
    var oEditor = FCKeditorAPI.GetInstance("fckLabelContent");//读fck内容
    var mystyle = oEditor.GetXHTML(true);
    if(mystyle.indexOf("[#form_agree]")<=-1){
	       alert("添加注册表单必须有固定样式");
	       return;
	    }
	var cnm ="[YX:unLoop,YX:LableType=Member,YX:Option=MemberAgree]"+mystyle+"[/YX:unLoop]";	 
    parent.getValue(cnm);
	 CloseDiv();

}

function getValue(value)
{
    if(value!="") 
    {
        var oEditor = FCKeditorAPI.GetInstance("fckLabelContent");
        if (oEditor.EditMode==FCK_EDITMODE_WYSIWYG)
        {
           oEditor.InsertHtml(""+value+"");
        }
        
        else
        {
        return false;
        }
    }
}
function CloseDiv()
{
    parent.document.getElementById("LabelDivid").style.display="none";
}

</script>
</head>
<body>
<form id="form1" runat="server">
<div>
     <table style="width: 100%;" class="form_table_input" >
     <tr>
            <td></td>
            <td>
            </td>
            
            <td>固定样式</td>
            <td>
             <asp:DropDownList ID="ddlForm" runat="server" onchange="javascript:getValue(this.value);">
             <asp:ListItem Value="" Text="-请选择样式-" />                 
                    <asp:ListItem Value="[#form_agree]" Text="协议内容" />
            </asp:DropDownList>
            </td>
           
            <td>
               <span style="color:Red">注：该样式是用户协议必选样式</span>
            </td>
          </tr>
          
        <tr>
            <td colspan="5">
                <FCKeditorV2:FCKeditor ID="fckLabelContent" runat="server"  BasePath="~/controls/fckeditor/"  Height="200px">
                </FCKeditorV2:FCKeditor>
            </td>
        </tr>
       
        <tr>
            <td colspan="4" align="center" style="text-align:center">
                <input id="bt_Exc" type="button" value="提交" onclick="ReturnValue()" />&nbsp;
                <input type="button" value=" 关闭 "  onclick="javascript:CloseDiv();" />
            </td>
            <td>
            </td>
        </tr>
     </table>
</div>
</form>
</body>
</html>
